from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from exams import views
from exams.views import *
import settings

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'YourSchool.views.home', name='home'),
    # url(r'^YourSchool/', include('YourSchool.foo.urls')),
    ('^$', home),
    ('^takeExam/(\d+)/$', takeExam ),
    (r'^answerExam/$', answerExam ),
    (r'^createExam/$', createExam),
    ('^resultByStudent/$', resultByStudent),
    #('^resultByStudent/$', error(404)),
    ('^studentIndex/$', studentIndex),
    ('^teacherIndex/$', teacherIndex),
    (r'^disableExam/$', disableExam),

    (r'^accounts/login/$','django.contrib.auth.views.login'),
    (r'^accounts/logout/$',logout_view),

    # Uncomment the admin/doc line below to enable admin documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),

    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)